<div class="widgets">
    <div class="row">
        <div class="col-xs-12">
            <ba-card baCardClass="with-scroll">
                <div class="section" id="newNotification">
                    <div class="row form-group">
                        <div class="col-xs-12" [ngClass]="{'hasError': !valid}">
                            <input #title="ngModel" [(ngModel)]="notificationTitle" class="form-control form-control-lg" placeholder="公告标题"
                            id="title" name="title" type="text" required>
                            <span [hidden]="title.valid || title.untouched" class="help-block" style="color: #ff0000">标题不能为空</span>
                        </div>
                    </div>
                    <ckeditor [(ngModel)]="ckeditorContent" [config]="config"></ckeditor>
                    <div class="row form-group">
                        <ul class="attach-list">
                            <li class="attach-list-item" *ngFor="let file of attachs; let i = index;">
                                <button class="btn btn-sm btn-danger" (click)="deleteAttachment(file.ids)">删除</button><span class="attach-name">{{'附件' + (i + 1) + ': ' + file.originName}}</span>
                            </li>
                        </ul>
                        <div class="col-xs-12">
                            
                            <file-uploader [url]="uploadUrl" [inputName]="attachName" (uploadend)="handleUploadend($event)"></file-uploader>
                        </div>
                    </div>
                    <div class="row form-group">
                        <div class="col-xs-12 btn-section btn-toolbar" style="margin-top: 20px;">
                            <a routerLink="/pages/asso/record/notification" class="btn btn-success pull-right">返回列表</a>
                            <button [disabled]="!title.valid" class="btn btn-primary pull-right" (click)="submitNotification()">提交</button>
                        </div>
                    </div>
                </div>
            </ba-card>
        </div>
    </div>
</div>
<div bsModal #msgModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-body">
                {{respMsg}}
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" (click)="msgModal.hide()">关闭</button>
                <a routerLink="/pages/asso/record/notification" role="button" class="btn btn-success">返回列表</a>
            </div>
        </div>
    </div>
</div>